package arrayChimbo;

import java.io.Serializable;
import java.util.ArrayList;

public class ArrayChimbo<E> extends ArrayList<String> implements Serializable{

	private static final long serialVersionUID = 1L;

	/**
	 * 
	 * @param elemento
	 * @return
	 */
	public boolean agregarSinRepetir(String elemento) {
		boolean agregar = true;
		int tamanio= super.size();
		for (int i=0; i < tamanio && agregar; i++) {
			agregar = !(elemento.equals(super.get(i)));
		}
		if(agregar)
		{super.add(elemento);}
		return agregar;
	}
}